package com.atwl.school_system.controller;

import com.atwl.school_system.bean.Banner;
import com.atwl.school_system.bean.vo.ProInfoVo;
import com.atwl.school_system.service.BannerService;
import com.atwl.school_system.service.ProService;
import com.atwl.school_system.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BannerController {

    @Autowired
    private BannerService bannerService;

    @GetMapping("/banner/info")
    public R getProInfoById(@RequestParam("start") Integer start, @RequestParam("num") Integer num) {
        List<Banner> bannerInfo = bannerService.getBanner(start, num);
        return R.ok().setData(bannerInfo);
    }
}
